package com.leigang.boot.service;

import com.leigang.boot.dao.UserDao;
import com.leigang.boot.entity.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserService {

    @Resource
    UserDao userDao;

    public void save(User user){
        userDao.save(user);
    }

    public List findAll(){
        return userDao.findAll();
    }

    public void delete(Integer id){
        userDao.deleteById(id);
    }

}
